<script type="text/html" template lay-done="layui.data.sendParams(d.params)">
  <div class="layui-form" lay-filter="form_agent">
    <input type="hidden" name="id" value="{{d.params.id || ''}}"/>
    <div class="layui-form-item">
      <label class="layui-form-label">代理商名称</label>
      <div class="layui-input-inline">
        <input type="text" name="name" value="{{d.params.name || ''}}" lay-verify="required" autocomplete="off"
               class="layui-input">
      </div>
    </div>
    {{# if (!d.params.admin_user) { }}
    <div class="layui-form-item">
      <label class="layui-form-label">登录用户名</label>
      <div class="layui-input-inline">
        <input type="text" name="user_name" value="" lay-verify="required"
               autocomplete="off"
               class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">登录密码</label>
      <div class="layui-input-inline">
        <input type="text" name="password" value="" lay-verify="required" autocomplete="off"
               class="layui-input">
      </div>
    </div>
    {{# } else { }}
    <div class="layui-form-item">
      <label class="layui-form-label">登录用户名</label>
      <div class="layui-word-aux layui-form-mid">
        <input type="text" value="{{d.params.admin_user.username || ''}}" autocomplete="off" disabled
               placeholder="修改密码" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">重置密码</label>
      <div class="layui-input-inline">
        <input type="text" name="password" value="" autocomplete="off"
               placeholder="重置密码" class="layui-input">
      </div>
    </div>
    {{# } }}
    <div class="layui-form-item">
      <div class="layui-footer">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
          <input type="button" lay-submit lay-filter="submit_agent" value="确认" class="layui-btn">
        </div>
      </div>
    </div>
  </div>
</script>
<script>
  layui.data.sendParams = function (obj) {
  }
</script>
